package com.zhentao.dataintegrity.domain.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@TableName("di_integrity_task")
public class IntegrityTask {

    @TableId(type = IdType.AUTO)
    private Long id;

    private String taskTitle;
    private String dataTypes; // JSON数组格式
    private String timeRangeType; // MONTH_1, MONTH_3, MONTH_6, YEAR_1
    private String triggerType; // SCHEDULED, MANUAL
    private String scheduleType; // MONTHLY, WEEKLY
    private String scheduleTime; // 默认02:00
    private String scheduleCron;
    private String taskStatus; // ENABLED, DISABLED
    private LocalDateTime lastRunTime;
    private LocalDateTime nextRunTime;
    private String lastRunStatus; // SUCCESS, FAILED, RUNNING
    private String lastRunError;
    private BigDecimal lastDiffRmb;
    private BigDecimal lastDiffUsd;

    @TableLogic
    private Integer isDelete;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedTime;

    // Getters and Setters
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }

    public String getTaskTitle() { return taskTitle; }
    public void setTaskTitle(String taskTitle) { this.taskTitle = taskTitle; }

    public String getDataTypes() { return dataTypes; }
    public void setDataTypes(String dataTypes) { this.dataTypes = dataTypes; }

    public String getTimeRangeType() { return timeRangeType; }
    public void setTimeRangeType(String timeRangeType) { this.timeRangeType = timeRangeType; }

    public String getTriggerType() { return triggerType; }
    public void setTriggerType(String triggerType) { this.triggerType = triggerType; }

    public String getScheduleType() { return scheduleType; }
    public void setScheduleType(String scheduleType) { this.scheduleType = scheduleType; }

    public String getScheduleTime() { return scheduleTime; }
    public void setScheduleTime(String scheduleTime) { this.scheduleTime = scheduleTime; }

    public String getScheduleCron() { return scheduleCron; }
    public void setScheduleCron(String scheduleCron) { this.scheduleCron = scheduleCron; }

    public String getTaskStatus() { return taskStatus; }
    public void setTaskStatus(String taskStatus) { this.taskStatus = taskStatus; }

    public LocalDateTime getLastRunTime() { return lastRunTime; }
    public void setLastRunTime(LocalDateTime lastRunTime) { this.lastRunTime = lastRunTime; }

    public LocalDateTime getNextRunTime() { return nextRunTime; }
    public void setNextRunTime(LocalDateTime nextRunTime) { this.nextRunTime = nextRunTime; }

    public String getLastRunStatus() { return lastRunStatus; }
    public void setLastRunStatus(String lastRunStatus) { this.lastRunStatus = lastRunStatus; }

    public String getLastRunError() { return lastRunError; }
    public void setLastRunError(String lastRunError) { this.lastRunError = lastRunError; }

    public BigDecimal getLastDiffRmb() { return lastDiffRmb; }
    public void setLastDiffRmb(BigDecimal lastDiffRmb) { this.lastDiffRmb = lastDiffRmb; }

    public BigDecimal getLastDiffUsd() { return lastDiffUsd; }
    public void setLastDiffUsd(BigDecimal lastDiffUsd) { this.lastDiffUsd = lastDiffUsd; }

    public Integer getIsDelete() { return isDelete; }
    public void setIsDelete(Integer isDelete) { this.isDelete = isDelete; }

    public LocalDateTime getCreatedTime() { return createdTime; }
    public void setCreatedTime(LocalDateTime createdTime) { this.createdTime = createdTime; }

    public LocalDateTime getUpdatedTime() { return updatedTime; }
    public void setUpdatedTime(LocalDateTime updatedTime) { this.updatedTime = updatedTime; }
}
